﻿<%@ Page Title="用户贡献" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" AutoEventWireup="true" CodeBehind="Contributions.aspx.cs" Inherits="RegexLib.Web.Views.User.Contributions" %>
<asp:Content ID="Content1" ContentPlaceHolderID="headContentPlaceHolder" runat="server">
	<link rel="Stylesheet" type="text/css" href="/Content/styles/RxView.css"/>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="LeftBar1ContentPlaceHolder" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<% var contributions = (RxLibrary.UserContribution[])ViewData["Contributions"]; %>
<% var pageIndex = (int)ViewData["PageIndex"]; %>
<% var pageSize = (int)ViewData["PageSize"]; %>
<% var totalPages = (int)ViewData["TotalPages"]; %>
<div class="box">
	<div class="bt">用户贡献</div>
	<div class="bc">
<% foreach (var c in contributions) %>
<% { %>
	<p><a href='<%= RxUrl.GetUserUrl(c.AccessKey) %>'><%= HttpUtility.HtmlEncode(c.Nickname) %></a> (<%= c.RegexCount %>)</p>
	<hr />
<% } %>
<% for (int pi = 1; pi <= totalPages; pi++) %>
<% { %>
	<% if (pi == pageIndex) %>
	<% { %>
		<span class="rx-curpg"><%= pi %></span>
	<% } %>
	<% else %>
	<% { %>
		<span class="rx-pg"><a href='<%= RxUrl.GetUserContributionsUrl(pi, pageSize) %>'><%= pi %></a></span>
	<% } %>
<% } %>
	</div>
</div>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ScriptPlaceHolder" runat="server">
</asp:Content>
